| Conditions | 1 |
| Total Lines | 11 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 2 |
| CRAP Score | 1 |
| Changes | 0 | ||
| 1 | import { SortOptions, ObjectType, SortedEntry } from './types'; |
||
| 28 | |||
| 29 | function createSortedObject( |
||
| 30 | entries: SortedEntry[], |
||
| 31 | options: SortOptions |
||
| 32 | ): ObjectType { |
||
| 33 | 1472 | const sortedEntries = entries.map(([key, value]) => [ |
|
| 34 | key, |
||
| 35 | sortRecursively(value, options), |
||
| 36 | ]); |
||
| 37 | |||
| 38 | 59 | return Object.fromEntries(sortedEntries); |
|
| 39 | } |
||
| 42 |